package com.icangya.domain;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "rw_buy_car")
public class RwBuyCar {

    private long id;

    private long shopid;//商品id

    private String shopName;//商品名称

    private String mainPic;//商品主图

    private String intro;//商品简介

    private int numGood;//购物车内的商品数量

    private Timestamp createTime;//创建时间

    private int IntoOrderStatus;//是否下订单。1：已经下订单，0：未下订单

    private String remark;//备注

    private long userid;//用户的id

    private String openid;//用户的openid

    private String nickName;//用户的昵称

    private String userImg;//用户的微信头像


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "shopid")
    public long getShopid() {
        return shopid;
    }

    public void setShopid(long shopid) {
        this.shopid = shopid;
    }

    @Basic
    @Column(name = "shop_nama")
    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    @Basic
    @Column(name = "main_pic")
    public String getMainPic() {
        return mainPic;
    }

    public void setMainPic(String mainPic) {
        this.mainPic = mainPic;
    }
    @Basic
    @Column(name = "intro")
    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }
    @Basic
    @Column(name = "num_good")
    public int getNumGood() {
        return numGood;
    }

    public void setNumGood(int numGood) {
        this.numGood = numGood;
    }
    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
    @Basic
    @Column(name = "into_order_status")
    public int getIntoOrderStatus() {
        return IntoOrderStatus;
    }

    public void setIntoOrderStatus(int intoOrderStatus) {
        IntoOrderStatus = intoOrderStatus;
    }
    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Basic
    @Column(name = "userid")
    public long getUserid() {
        return userid;
    }

    public void setUserid(long userid) {
        this.userid = userid;
    }
    @Basic
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }
    @Basic
    @Column(name = "nick_name")
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
    @Basic
    @Column(name = "user_img")
    public String getUserImg() {
        return userImg;
    }

    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }

    public RwBuyCar(long shopid, String shopName, String mainPic, String intro, int numGood, Timestamp createTime, int intoOrderStatus, String remark, long userid, String openid, String nickName, String userImg) {
        this.shopid = shopid;
        this.shopName = shopName;
        this.mainPic = mainPic;
        this.intro = intro;
        this.numGood = numGood;
        this.createTime = createTime;
        IntoOrderStatus = intoOrderStatus;
        this.remark = remark;
        this.userid = userid;
        this.openid = openid;
        this.nickName = nickName;
        this.userImg = userImg;
    }

    public RwBuyCar() {
    }

    @Override
    public String toString() {
        return "RwBuyCar{" +
                "id=" + id +
                ", shopid=" + shopid +
                ", shopName='" + shopName + '\'' +
                ", mainPic='" + mainPic + '\'' +
                ", intro='" + intro + '\'' +
                ", numGood=" + numGood +
                ", createTime=" + createTime +
                ", IntoOrderStatus=" + IntoOrderStatus +
                ", remark='" + remark + '\'' +
                ", userid=" + userid +
                ", openid='" + openid + '\'' +
                ", nickName='" + nickName + '\'' +
                ", userImg='" + userImg + '\'' +
                '}';
    }
}
